/*
 * Copyright 2015-2016 Imply Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '../../../imports';

.collection-tile-card {

  // Importing this here so it only applies to .collection-tile-card
  // otherwise it pollutes the global CSS
  @import '../../../utils/styles/grid';

  &.editing {
    cursor: move;

    .headband {
      cursor: move;
    }

    .content {
      pointer-events: none;
    }
  }

  &.dragged {
    opacity: 0.4;
  }

  &.drop-before::after {
    content: '';
    position: absolute;
    top: 25px;
    bottom: 25px;
    left: -2px;
    width: 2px;
    border-right: 2px dashed $brand;
  }

  &.drop-after::after {
    content: '';
    position: absolute;
    top: 25px;
    bottom: 25px;
    right: -2px;
    width: 2px;
    border-right: 2px dashed $brand;
  }

  > * {
    @extend %module;
    width: 100%;
    padding: 10px 20px 10px 18px;
  }

  .headband {
    height: 66px;
    border-bottom: 1px solid $border-super-light;
    border-radius: $corner $corner 0 0;
    cursor: pointer;

    .title {
      color: #444;
      font-size: 14px;
      margin-bottom: 5px;
      margin-top: 2px;

      // Otherwise the bottom of the text gets cut off...
      // (see http://stackoverflow.com/questions/6421966/css-overflow-x-visible-and-overflow-y-hidden-causing-scrollbar-issue)
      height: 18px;
    }

    .description {
      color: $text-lighter;
      font-size: 12px;

      // Otherwise the bottom of the text gets cut off...
      // (see http://stackoverflow.com/questions/6421966/css-overflow-x-visible-and-overflow-y-hidden-causing-scrollbar-issue)
      height: 15px;
    }

    .expand-button {
      cursor: pointer;
      width: 19px;

      path {
        fill: $text-lighter;
      }
    }

    &:hover {
      .expand-button path {
        fill: $text-medium;
      }
    }

    .delete-button {
      cursor: pointer;
      width: 19px;

      path {
        fill: $brand;
      }

      &:hover {
        path {
          fill: $danger;
        }
      }
    }
  }

  .content {
    border-radius: 0 0 $corner $corner;

    .glass {
      @include unpin-full(0);
      background-color: hsla(0, 0%, 70%, 0.5);
      cursor: move;

      .title {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 23px;
        color: hsla(200, 8%, 15%, 1.00);
      }
    }
  }
}
